package com.sun.design.factory;

import com.sun.design.factory.method.BenChiFactory;
import com.sun.design.factory.method.MoBaiFactory;
import com.sun.design.factory.method.WuLingFactory;
import com.sun.design.factory.simple.CarFactory;
import org.junit.Test;

public class Test01 {
    @Test
    public void Demo(){
        Car wuling = CarFactory.getCar("wuling");
        wuling.name();
    }
    @Test
    public void Demo2(){
        Car car1 = new WuLingFactory().getCar();
        car1.name();
        Car car2 = new BenChiFactory().getCar();
        car2.name();
        Car car3 = new MoBaiFactory().getCar();
        car3.name();
    }
}
